home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / foscom12.arc / CHKMDM.PAS < prev    next >
Pascal/Delphi Source File  |  1989-08-26  |  767b  |  36 lines

  1. Program Testmodem;
  2. Uses Crt,foscom;
  3.  
  4. Var
  5.   T       : Boolean;
  6.   Comport : Byte;
  7.   St      : String;
  8.  
  9. Begin
  10.   writeln;
  11.   writeln ('Modem-Tester.');
  12.   writeln ('Copyright (c)) 1989 by Me.');
  13.   if paramcount<1 then begin
  14.     writeln;
  15.     writeln ('Usage: CHKMDM <Comport: 1,2,3 or 4>');
  16.     halt;
  17.   end;
  18.   St:=paramstr(1);
  19.   if st='1' then comport:=1;
  20.   if st='2' then comport:=2;
  21.   if st='3' then comport:=3;
  22.   if st='4' then comport:=4;
  23.  
  24.   Fos_Init(Comport);
  25.   Fos_Parms(Comport,1200,8,'N',1);
  26.   clrscr;
  27.   writeln ('Testing modem....');
  28.   T:=Fos_CheckModem(Comport);
  29.   writeln;
  30.   Case T of
  31.     TRUE : Writeln ('OK. Modem responding correctly');
  32.     FALSE: Writeln ('Modem is NOT responding...');
  33.   end;
  34.   Fos_Close(comport);
  35.   end.
  36.